package com.example.shop.modules.sys.controller;


import com.example.shop.modules.sys.service.IGoodsSpecService;
import com.example.shop.persistence.entity.GoodsSpec;
import com.example.shop.utils.JSONResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

import static com.example.shop.utils.JSONResult.renderSuccess;

/**
 * <p>
 * 商品规格分类名称表 前端控制器
 * </p>
 *
 * @author jason
 * @since 2020-06-05
 */
@Api(tags = "商品规格分类名称表")
@RestController
@RequestMapping("/sys/goodsSpec")
public class GoodsSpecController {

    @Autowired
    private IGoodsSpecService goodsSpecService;

    @GetMapping
    @ApiOperation(value = "查询商品规格分类名称",notes = "不分页，不分级")
    public JSONResult getGoodsSpecList(){
        return renderSuccess(goodsSpecService.list());
    }

}

